#pragma once
#include "core.h"
#include <QColor>

/// <summary>
/// Style管理类，必须在主线程中使用！
/// </summary>

class ResourceHolder;
class S_CORE_EXPORT StyleMgr
{
public:
	enum class StyleType
	{
		kDefault,
		kWhite
	};

	static StyleMgr& instance();

	QColor color(const QString& crName);
	int size(const QString& sizeName);
	void changeStyle(StyleType style);
	QString appStyleSheet();
private:
	StyleMgr();

private:
	StyleType	m_style = StyleType::kDefault;
	ResourceHolder* m_res = nullptr;
};

#define NAME_COLOR(clr) StyleMgr::instance().color(clr)
